import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false;

import './assets/css/index.scss' // global css

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN'
Vue.use(ElementUI, { locale });

import './icons'
import router from './router'
import store from './store'

// const devInnerWidth= 1920.0; // 开发时的InnerWidth
// const zoomFactor =  window.innerWidth / devInnerWidth;
// require('electron').webFrame.setZoomFactcor(zoomFactor);

import i18n from "./i18n"

import './utils/permission'
import './utils/db'

import Highchart from "highcharts/highcharts";
import HighchartsVue from "highcharts-vue";

import exportingInit from 'highcharts/modules/exporting'
exportingInit(Highchart);

import exportDataInit from 'highcharts/modules/export-data'
exportDataInit(Highchart);

Vue.use(HighchartsVue);

Highchart.setOptions({
  lang:{
    contextButtonTitle: i18n.t("chart.contextButtonTitle"),
    decimalPoint: i18n.t("chart.decimalPoint"),
    drillUpText: i18n.t("chart.drillUpText"),
    loading: i18n.t("chart.loading") ,
    printChart: i18n.t("chart.printChart"),
    resetZoom: i18n.t("chart.resetZoom"),
    resetZoomTitle: i18n.t("chart.resetZoomTitle"),
    viewFullscreen:i18n.t("chart.viewFullscreen"),
    viewData: i18n.t("chart.viewData"),
    downloadCSV: i18n.t("chart.downloadCSV"),
    downloadXLS: i18n.t("chart.downloadXLS"),
    downloadJPEG: i18n.t("chart.downloadJPEG"),
    downloadPDF: i18n.t("chart.downloadPDF"),
    downloadPNG: i18n.t("chart.downloadPNG"),
    downloadSVG: i18n.t("chart.downloadSVG"),

  }
});

import Print from 'vue-print-nb'
Vue.use(Print);
import DataPrintPanel from './components/print';
Vue.component('DataPrintPanel',DataPrintPanel);

new Vue({
  render: h => h(App),
  router,
  store,
  i18n
}).$mount('#app');

